﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;
using System.Xml;
using System.IO;
using DLL.Entities;

namespace DLL
{
    public class xmlUt
    {
        public static bool WriteXML(object savedObj, string fileToSave, XmlSerializer serializer)
        {
            try
            {
                TextWriter textWriter = new StreamWriter(fileToSave);
                serializer.Serialize(textWriter, savedObj);
                textWriter.Close();
                return true;
            }
            catch (Exception ex)
            {
                UtilityEX.LogFile(ex.ToString());
                return false;
            }
        }

    }
}
